const state = {
  tabs: [
    {
      name: "首页",
      icon: "wap-home-o",
      path: "home"
    },
    {
      name: "分组",
      icon: "qr",
      path: "group"
    },
    {
      name: "设置",
      icon: "setting-o",
      path: "option"
    }
  ],
  image: ""
};

const mutations = {
  SET_TABS: (state, tabs) => {
    state.tabs = tabs;
  },

  SET_IMAGE: (state, image) => {
    state.image = image;
  }
};

const actions = {
  // 获取首页数据
  setHomeBackground({ commit }, image) {
    commit("SET_IMAGE", image);
  }
};

export default {
  namespaced: true,
  state,
  mutations,
  actions
};
